<?php
/*
 * @Description  : 配置验证器
 * @Author       : 
 * @Date         : 2020-05-06
 * @LastEditTime : 2020-12-25
 */

namespace app\store\validate;

use think\Validate;

class AdminPrize extends Validate
{
    // 验证规则
    protected $rule = [
        'upgrade' => ['require', 'array'],
        'prize'   => ['require', 'array'],
    ];

    // 错误信息
    protected $message = [
        'upgrade.require' => '缺少参数：upgrade',
        'upgrade.array'   => '参数upgrade类型不正确',
        'prize.require'   => '缺少参数：prize',
        'prize.array'     => '参数prize类型不正确'
    ];

    // 验证场景
    protected $scene = [
        'save'     => ['upgrade', 'prize'],
        'batchSet' => ['data'],
    ];
}
